﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TechTalk.SpecFlow;
using FluentAssertions;
using NUnit.Framework;
using OpenQA.Selenium;
using OpenQA.Selenium.Support;
using OpenQA.Selenium.Support.PageObjects;
using OpenQA.Selenium.Support.UI;
using OpenQA.Selenium.Chrome;
using OpenQA.Selenium.Firefox;
using OpenQA.Selenium.Remote;
using System.Threading;

namespace DocProcessingWorkFlowScenarios
{
    [Binding]
    public class BBOSEnvSelectedViaEnvDropdownSteps
    {
        BBOS_LoginPage loginPage = new BBOS_LoginPage();
        BBOS_WelcomePage welcomePage = new BBOS_WelcomePage();

        //private string Environment { get; set; }

        [Given]
        public void Given_I_select_Environment_of_ENVIRONMENT(string environment)
        {
            //this.Environment = environment;
            //new SelectElement(BrowserUtility.Current.FindElement(By.Id("SelectedEnvironment"))).SelectByText(environment);
            welcomePage.SelectEnv(environment);
        }


        [Then]
        public void Then_Envirnoment_displayed()
        {

            welcomePage.EnvDisplayed();
            
            //Assert.IsTrue(BrowserUtility.Current.PageSource.Contains(this.Environment), this.Environment + "envirnoment not displayed");
            //BrowserUtility.Current.Close();
            //BrowserUtility.Current.Dispose();
        }
    }
}
